package com.lock.lock_common.api.productApi;

import com.lock.lock_common.dto.Result;
import com.lock.lock_common.pojo.ProductClassify;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


public interface ProductClassifyApi {
    //根据父分类查找
    @RequestMapping("/selectByClassifyParentId")
    Result<List<ProductClassify>> selectByClassifyParentId(@RequestParam Integer classifyParentId);

    //根据分类ID查找
    @RequestMapping("/selectByClassifyId")
    Result<ProductClassify> selectByClassifyId(@RequestParam Integer classifyId);

    //添加分类
    @RequestMapping("/addClassify")
    Result<Integer> addClassify(@RequestBody ProductClassify classify);

    //修改分类
    @RequestMapping("/updClassify")
    Result<Integer> updClassify(@RequestBody ProductClassify classify);

    //删除分类
    @RequestMapping("/delClassify")
    Result<Integer> delClassify(@RequestParam Integer classifyId);

}
